package com.zzyk.main.service;

import com.zzyk.main.model.pojo.TimeRule;
import com.zzyk.main.model.vo.EnterpriseTimeRule;
import com.zzyk.main.model.vo.OrganizationInfo;
import com.zzyk.main.model.vo.TimeRuleVO;

import java.util.List;

public interface TimeRuleService{


    int deleteByPrimaryKey(Integer id);

    int insert(TimeRule record);

    int insertSelective(TimeRule record);

    TimeRule selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(TimeRule record);

    int updateByPrimaryKey(TimeRule record);

    /**
     * 添加时间规则
     * @param eId
     * @param beginTime
     * @param endTime
     * @param cycle
     */
    void addTimeRule(Integer eId, String[] beginTime, String[] endTime, String[] cycle);

    /**
     * 删除企业ID下所有的时间规则
     * @param id
     */
    void deleteByEnterprise(Integer id);

    /**
     * 根据企业ID查询时间规则
     * @param eId
     * @return
     */
    List<TimeRuleVO> findTimeRuleByEnterprise(Integer eId);

    List<EnterpriseTimeRule> findTimeRuleByParam(OrganizationInfo organizationInfo);
}
